﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp1
{
    class Student:Person
    {
        private string major;
        private string grade;

        public string Major 
        { get { return this.major;  }
          set { this.major = value; } 
        }
        public string Grade 
        {
            get { return this.grade;  }
            set { this.grade = value; } 
        }

        public  Student(string id,string name,string sex,string cardid,int tel,string major,string garde ) 
        {
            this.Id = id;
            this.Name = name;
            this.Sex = sex;
            this.CardId = cardid;
            this.Tel = tel;
            this.Major = major;
            this.Grade = garde;

        }
        public void Write() 
        {

            //Console.WriteLine("请输入ID");
            // this.Id = Console.ReadLine();
            //Console.WriteLine("请输入姓名");
            //this.Name = Console.ReadLine();
            //Console.WriteLine("请输入性别");
            //this.Sex= Console.ReadLine();
            //Console.WriteLine("请输入身份证号");
            //this.CardId = Console.ReadLine();
            //Console.WriteLine("请输入你的手机号码");
            //this.Tel = int.Parse(Console.ReadLine());
            //Console.WriteLine("请输入你的专业");
            //this.Major = Console.ReadLine();
            //Console.WriteLine("请输入你的年级");
            //this.Grade = Console.ReadLine();

            Console.WriteLine("你的ID是{0}，姓名是{1}，性别是{2},身份证号是{3}，手机号码是{4}，专业是{5}，年级是{6}",this.Id,this.Name,this.Sex,this.CardId,this.Tel,this.Major,this.Grade);
        }
    }
}
